package com.raysun.androidbase

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.raysun.androidbase.databinding.ActivityMainBinding
import com.raysun.androidbase.intent.IntentSummaryActivity
import com.raysun.androidbase.interaction.GainResultActivity
import com.raysun.androidbase.interaction.ImplicitlyIntentActivity
import com.raysun.androidbase.interaction.VisibilityActivity
import com.raysun.androidbase.service.ServiceActivity

class MainActivity : AppCompatActivity() {

    private lateinit var binding: ActivityMainBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)

        binding.implicitlyIntent.setOnClickListener {
            startActivity(Intent(this, ImplicitlyIntentActivity::class.java))
        }

        binding.gainResult.setOnClickListener {
            startActivity(Intent(this, GainResultActivity::class.java))
        }

        binding.packageVisibility.setOnClickListener {
            startActivity(Intent(this, VisibilityActivity::class.java))
        }

        binding.intentSummary.setOnClickListener {
            startActivity(Intent(this, IntentSummaryActivity::class.java))
        }

        binding.service.setOnClickListener {
            startActivity(Intent(this, ServiceActivity::class.java))
        }
    }
}